package gradation.impl;

import gradation.AbstractGradation;

import java.util.Arrays;

import debug.DebugLogger;


public class RGBAverageGradation extends AbstractGradation {

	@Override
	public int[] processPixel(int[] pixel, int x, int y) {
		int val = 0;
		for (int p : pixel) {
			val += p;
		}
		val /= pixel.length;
		
		Arrays.fill(pixel, val);

		return pixel;
	}

}
